<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head
	th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
<link rel="stylesheet"
	th:href="@{/lib/zTree_v3/css/zTreeStyle/zTreeStyle.css}"
	type="text/css">
</head>
<body>
	<div class="layui-form timo-compile">
		<form name="add" th:action="@{/complete/add}">
			<input type="hidden" name="id" th:if="${clue}" th:value="${clue.id}" />
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">手机号</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="phone"
						placeholder="请输入手机号" th:value="${clue?.phone}"> <input
						class="layui-input" type="text" name="updateTime"
						placeholder="请输入完善时间"
						th:value="${#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">昵称</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="nick"
						placeholder="请输入昵称" th:value="${clue?.nick}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">机构代码</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="orgCode"
						placeholder="请输入机构代码" th:value="${clue?.orgCode}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">机构名称</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="orgName"
						placeholder="请输入机构名称" th:value="${clue?.orgName}">
				</div>
			</div>

			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">分配人</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="assignBy"
						placeholder="请输入分配人" th:value="${clue?.assignBy?.id}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">分配时间</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="assignTime"
						placeholder="请输入分配时间" th:value="${clue?.assignTime}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">分配状态</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="assignStatus"
						placeholder="请输入分配状态" th:value="0">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">分配备注</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="assignNote"
						placeholder="请输入分配备注" th:value="${clue?.assignNote}">
				</div>
			</div>

			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">分派人</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="allotBy"
						placeholder="请输入分派人" th:value="${clue?.allotBy?.id}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">分派时间</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="allotTime"
						placeholder="请输入分派时间"
						th:value="${#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">分派状态</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="allotStatus"
						placeholder="请输入分派状态" th:value="1">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">分派备注</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="allotNote"
						placeholder="请输入分派备注" th:value="${clue?.allotNote}">
				</div>
			</div>

			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">审核人</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="authBy"
						placeholder="请输入审核人" th:value="${clue?.authBy?.id}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">审核时间</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="authTime"
						placeholder="请输入审核时间" th:value="${clue?.authTime}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">审核状态</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="authStatus"
						placeholder="请输入审核状态" th:value="${clue?.authStatus}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">审核备注</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="authNote"
						placeholder="请输入审核备注" th:value="${clue?.authNote}">
				</div>
			</div>

			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">通知人</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="notifyBy"
						placeholder="请输入通知人" th:value="${clue?.notifyBy?.id}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">通知时间</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="notifyTime"
						placeholder="请输入通知时间" th:value="${clue?.notifyTime}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">通知状态</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="notifyStatus"
						placeholder="请输入通知状态" th:value="${clue?.notifyStatus}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">通知备注</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="notifyNote"
						placeholder="请输入通知备注" th:value="${clue?.notifyNote}">
				</div>
			</div>

			<input type="hidden" name="id" th:if="${clue}" th:value="${clue.id}" />
			<div class="layui-form-item">
				<label class="layui-form-label">姓名</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="name"
						placeholder="请输入姓名" th:value="${clue?.name}">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">性别</label>
				<div class="layui-input-inline">
					<select class="timo-search-select layui-readonly" name="sex"
						mo:dictKey="USER_SEX" mo-selected="${clue?.sex}"></select>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">证件类型</label>
				<div class="layui-input-inline">
					<select class="timo-search-select" name="idType"
						mo:dictKey="ID_TYPE" mo-selected="${clue?.idType}"></select>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">证件号</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="idNo"
						placeholder="请输入证件号" th:value="${clue?.idNo}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">完善人</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="completeBy"
						placeholder="请输入完善客服" th:value="${sessionUser?.id}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">完善时间</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="completeTime"
						placeholder="请输入完善时间"
						th:value="${#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}">
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<label class="layui-form-label">完善状态</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="completeStatus"
						placeholder="请输入完善状态" th:value="1">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">备注</label>
				<div class="layui-input-inline">
					<input class="layui-input" type="text" name="completeNote"
						placeholder="请输入备注" th:value="${clue?.completeNote}">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">上传图片</label>
				<div class="layui-input-inline">
					<button type="button" class="layui-btn upload-image" name="image[]"
						up-field="id" up-url="/upload/image">
						<i class="layui-icon"></i>上传图片
					</button>
				</div>
				<div class="upload-show">
					<div class="upload-item" th:each="file,fileStat : ${clue?.files}">
						<img th:src="${file.path}" th:alt="${file.id}" /> <input
							th:id="${file.id}" type="hidden" name="image[]"
							th:value="${file.id}" /> <i
							class="upload-item-close layui-icon layui-icon-close"></i>
					</div>
				</div>
			</div>

			<div class="layui-form-item timo-finally">
				<button class="layui-btn ajax-submit">
					<i class="fa fa-check-circle"></i> 提交
				</button>
				<button type="button" class="layui-btn ajax-submit" onclick="stash()" lay-filter="*">
					<i class="fa fa-check-circle"></i> 暂存
				</button>
				<button class="layui-btn btn-secondary close-popup">
					<i class="fa fa-times-circle"></i> 关闭
				</button>
			</div>
		</form>
	</div>
	<script th:replace="/common/template :: script"></script>
	<script type="text/javascript"
		th:src="@{/js/plugins/jquery-3.3.1.min.js}"></script>
	<script type="text/javascript"
		th:src="@{/lib/zTree_v3/js/jquery.ztree.core.min.js}"></script>
	<script type="text/javascript" th:src="@{/js/timoTree.js}"></script>
	<script type="text/javascript">
		// 树形菜单
		$.fn.selectTree();
		
		function stash() {
	        document.add.completeStatus.value = 0;
	    }
	</script>
</body>
</html>